﻿using System.Collections.Generic;
using System.Linq;
using Core.BO;
using Core.Contract.DataContract;
using Data.DAO;
using www.Models;

namespace Data.BO
{
    public class MemberBO//:BaseBO<MemberDAO,RelaxMember>
    {
        #region value
        private readonly MemberDAO _memberDao=new MemberDAO();
        #endregion

        #region Ham Lay du lieu

        public IQueryable<RelaxMemberDataContract> GetMbDataContracts()
        {
            return _memberDao.GetMbDataContracts();
        }

        public IQueryable<RelaxLoginsDataContract> GetMemberDataContracts(string sUsername)
        {
            return _memberDao.GetMemberDataContracts(sUsername);
        }

        public IQueryable<RelaxLoginsDataContract> GetAllMemberDataContracts()
        {
            return _memberDao.GetMemberDataContracts();
        }
        
        #endregion

        #region ham Add
        public void Add(RelaxMember member)
        {
            _memberDao.Add(member);
        }
      
        #endregion

        #region Ham Update

        public void Update(RelaxMember member)
        {
            _memberDao.Update(member);
        }
        #endregion

        #region Ham Delete

        public void Delete(long iId)
        {
            _memberDao.Delete(iId);
        }
        #endregion
    }
}
